Adwaita: Redo combo box entry styling
authorMatthias Clasen <mclasen@redhat.com>
Fri, 6 Nov 2015 00:15:43 +0000 (19:15 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 6 Nov 2015 02:59:56 +0000 (21:59 -0500)
Instead of relying on .linked or + (which doesn't work right in rtl),
use :not(:only-child) to select a button that is not alone inside a
combobox.

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index a533fc9de6896e03c28ca4f36ee70d6a564321ac..dac1b0c4c9af43db3639502c436250b1078087d5 100644 (file)
@@ -959,7 +959,7 @@ combobox {
     // always disable separators
     -GtkWidget-wide-separators: true;
   }
-  & entry.combo {
+  & entry.combo {
     &:dir(ltr) {
       border-top-right-radius: 0;
       border-bottom-right-radius: 0;
@@ -969,7 +969,7 @@ combobox {
       border-bottom-left-radius: 0;
     }
   }
-  & button.combo {
+  & > button.combo:not(:only-child) {
     &:dir(ltr) {
       border-top-left-radius: 0;
       border-bottom-left-radius: 0;
index 9d0518aafc6376d514dc3581e4b34745537b4564..fe4166990590423a190d9330e180f8d06a9d45e3 100644 (file)
@@ -1460,17 +1460,19 @@ combobox {
     text-shadow: none; }
   combobox.separator.vertical {
     -GtkWidget-wide-separators: true; }
-  combobox entry.combo:dir(ltr), combobox spinbutton.combo:dir(ltr) {
+  combobox > entry.combo:dir(ltr), combobox > spinbutton.combo:dir(ltr) {
     border-top-right-radius: 0;
     border-bottom-right-radius: 0; }
-  combobox entry.combo:dir(rtl), combobox spinbutton.combo:dir(rtl) {
+  combobox > entry.combo:dir(rtl), combobox > spinbutton.combo:dir(rtl) {
     border-top-left-radius: 0;
     border-bottom-left-radius: 0; }
-  combobox button.combo:dir(ltr) {
+  combobox > button.combo:not(:only-child):dir(ltr), headerbar combobox > button.combo.titlebutton:not(:only-child):dir(ltr),
+  .titlebar combobox > button.combo.titlebutton:not(:only-child):dir(ltr) {
     border-top-left-radius: 0;
     border-bottom-left-radius: 0;
     border-left-style: none; }
-  combobox button.combo:dir(rtl) {
+  combobox > button.combo:not(:only-child):dir(rtl), headerbar combobox > button.combo.titlebutton:not(:only-child):dir(rtl),
+  .titlebar combobox > button.combo.titlebutton:not(:only-child):dir(rtl) {
     border-top-right-radius: 0;
     border-bottom-right-radius: 0;
     border-right-style: none; }
index e26f4071c6929cb554d27d5015126942db3e458d..fb4a8f57f9dd58a0132dd0960217e1cf200883a9 100644 (file)
@@ -1460,17 +1460,19 @@ combobox {
     text-shadow: none; }
   combobox.separator.vertical {
     -GtkWidget-wide-separators: true; }
-  combobox entry.combo:dir(ltr), combobox spinbutton.combo:dir(ltr) {
+  combobox > entry.combo:dir(ltr), combobox > spinbutton.combo:dir(ltr) {
     border-top-right-radius: 0;
     border-bottom-right-radius: 0; }
-  combobox entry.combo:dir(rtl), combobox spinbutton.combo:dir(rtl) {
+  combobox > entry.combo:dir(rtl), combobox > spinbutton.combo:dir(rtl) {
     border-top-left-radius: 0;
     border-bottom-left-radius: 0; }
-  combobox button.combo:dir(ltr) {
+  combobox > button.combo:not(:only-child):dir(ltr), headerbar combobox > button.combo.titlebutton:not(:only-child):dir(ltr),
+  .titlebar combobox > button.combo.titlebutton:not(:only-child):dir(ltr) {
     border-top-left-radius: 0;
     border-bottom-left-radius: 0;
     border-left-style: none; }
-  combobox button.combo:dir(rtl) {
+  combobox > button.combo:not(:only-child):dir(rtl), headerbar combobox > button.combo.titlebutton:not(:only-child):dir(rtl),
+  .titlebar combobox > button.combo.titlebutton:not(:only-child):dir(rtl) {
     border-top-right-radius: 0;
     border-bottom-right-radius: 0;
     border-right-style: none; }